package system.model;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

/**
 * SyroleSyresources entity. @author MyEclipse Persistence Tools
 */
@Entity
@Table(name = "syrole_syresources", catalog = "sypro")
public class SyroleSyresources implements java.io.Serializable {

	// Fields

	private String id;
	private Syrole syrole;
	private Syresources syresources;

	// Constructors

	/** default constructor */
	public SyroleSyresources() {
	}

	/** full constructor */
	public SyroleSyresources(String id, Syrole syrole, Syresources syresources) {
		this.id = id;
		this.syrole = syrole;
		this.syresources = syresources;
	}

	// Property accessors
	@Id
	@Column(name = "ID", unique = true, nullable = false, length = 36)
	public String getId() {
		return this.id;
	}

	public void setId(String id) {
		this.id = id;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "ROLE_ID", nullable = false)
	public Syrole getSyrole() {
		return this.syrole;
	}

	public void setSyrole(Syrole syrole) {
		this.syrole = syrole;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "RESOURCES_ID", nullable = false)
	public Syresources getSyresources() {
		return this.syresources;
	}

	public void setSyresources(Syresources syresources) {
		this.syresources = syresources;
	}

}